import React, {Component} from 'react';
import SvgUri from 'react-native-svg-uri';
import svgs from '../assets/svg/svgs';

export default class Icon extends Component {
    
    render() {
    	let type = this.props.type;
    	let svgXmlData;
    	if(type) {
    		svgXmlData = svgs[type];
    	}
        return (
        	<SvgUri
	        width={this.props.width}
	        height={this.props.height}
	        svgXmlData={svgXmlData} 
	        fill={this.props.fill} 
	        style={this.props.style} />
        );
    }
    
}